﻿using System;
using System.Collections.Generic;

namespace XXX.Models.YiJing
{

    public class YiJing2MES  //U8推送MES协同参数
    {

        //public string cAccount { get; set; }
        public string cVouchType { get; set; }
        //推送的单据号
        public string cCode { get; set; }
        //组织
        public string cOrg { get; set; }
    }

    /// <summary>
    /// MES请求头
    /// </summary>
    public class MesRequest
    {
        /// <summary>
        /// 请求id，唯一值
        /// </summary>
        public string reqCode { get; set; }
        /// <summary>
        /// 组织代码
        /// </summary>
        public string partnerCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string userCode { get; set; }
        /// <summary>
        /// 接口类型
        /// </summary>
        public string docType { get; set; }

        public string updateType { get; set; }
        /// <summary>
        /// 数据
        /// </summary>
        public List<object> data { get; set; }
    }
    /// <summary>
    /// MES返回消息
    /// </summary>
    public class MesResult
    {
        public string resultCode { get; set; }
        public string resultMsg { get; set; }
        public List<object> data { get; set; }
    }
    /// <summary>
    /// BS_SUP 供应商信息
    /// </summary>
    public class BS_SUP
    {
        /// <summary>
        /// 
        /// </summary>
        public string SUP_CODE { get; set; }
        /// <summary>
        /// 供应商001
        /// </summary>
        public string SUP_NAME { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string IS_VALID { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string sup_addr { get; set; }

        public string org_id { get; set; }

        public string QUEUE_ID { get; set; }

        public string remark { get; set; }
    }


    /// <summary>
    /// BS_CUST 客户信息
    /// </summary>
    public class BS_CUST
    {

        /// <summary>
        /// 
        /// </summary>
        public string CUST_CODE { get; set; }
        /// <summary>
        /// 供应商001
        /// </summary>
        public string CUST_NAME { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string IS_VALID { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string contacts_fax { get; set; }
        public string cust_addr { get; set; }
        public string CONTACTS_USER { get; set; }
        public string PHONE { get; set; }

        public string org_id { get; set; }

        public string QUEUE_ID { get; set; }

        public string remark { get; set; }
    }


    /// <summary>
    /// BS_MTRL 物料信息
    /// </summary>
    public class BS_MTRL
    {
        public string mtrl_code { get; set; }
        public string mtrl_name { get; set; }
        public string mtrl_sim_name { get; set; }
        public string mtrl_desc { get; set; }
        public string MUNIT_Code { get; set; }
        public int mtrl_ptype { get; set; }
        public decimal pack_qty { get; set; }
        public decimal sk_qty { get; set; }
        public decimal max_sk_qty { get; set; }
        public decimal min_sk_qty { get; set; }
        public int MTRL_SPCL { get; set; }
        public string phase_code { get; set; }
        public string IS_MSD { get; set; }
        public string MSD_LV_ID { get; set; }
        public string msd_si_code { get; set; }
        public string mtype_code { get; set; }
        public string mtype_name { get; set; }
        public string mtrl_lev { get; set; }
        public int joined_board { get; set; }
        public string is_use_sku { get; set; }
        public string sku_name { get; set; }
        public string sku_code { get; set; }

        public string IS_VALID { get; set; }
        public string org_id { get; set; }
        public string QUEUE_ID { get; set; }
        public string remark { get; set; }
    }

    /// <summary>
    /// BS_STORE 仓库信息
    /// </summary>
    public class BS_STORE
    {


        public string store_code { get; set; }
        public string store_name { get; set; }

        public string IS_VALID { get; set; }
        public string org_id { get; set; }
        public string QUEUE_ID { get; set; }
        public string remark { get; set; }
    }

    /// <summary>
    /// BS_TC 收发类别信息
    /// </summary>
    public class BS_TC
    {

        public string TC_CODE { get; set; }
        public string TC_NAME { get; set; }
        public int TC_TYPE { get; set; }
        public string IS_FINAL { get; set; }

        public string IS_VALID { get; set; }
        public string org_id { get; set; }
        public string QUEUE_ID { get; set; }
        public string remark { get; set; }
    }

    /// <summary>
    /// BS_COMPANY 部门信息
    /// </summary>
    public class BS_COMPANY
    {
        public string company_code { get; set; }
        public string company_cname { get; set; }
        public string IS_FINAL { get; set; }
        public string parent_company_code { get; set; }
        public string IS_VALID { get; set; }
        public string org_id { get; set; }
        public string QUEUE_ID { get; set; }
        public string remark { get; set; }
    }

    /// <summary>
    /// BS_MTRL_TYPE 存货分类
    /// </summary>
    public class BS_MTRL_TYPE
    {

        public string mtype_code { get; set; }
        public string mtype_name { get; set; }
        public string IS_FINAL { get; set; }

        public string IS_VALID { get; set; }
        public string org_id { get; set; }
        public string QUEUE_ID { get; set; }
        public string remark { get; set; }
    }

    /// <summary>
    /// BS_ITEM 项目档案
    /// </summary>
    public class BS_ITEM
    {
        public string PROJECT_ID { get; set; }
        public string PROJECT_NAME { get; set; }
        public string PROJECT_CATE_CODE { get; set; }
        public string PROJECT_CATE_NAME { get; set; }
        public string IS_VALID { get; set; }
        public int IS_FINISH { get; set; }
        public string org_id { get; set; }
        public string QUEUE_ID { get; set; }
        public string remark { get; set; }
    }



    public class BS_BOM
    {
        /// <summary>
        /// 
        /// </summary>
        public string org_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bom_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bom_ver { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string is_def { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string is_valid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string erp_prod_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string prod_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string erp_prod_ver { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string remark { get; set; }
        
        public List<BS_BOMs> bs_bom_mtrl { get; set; }



    }

    public class BS_BOMs
    {
         
        /// <summary>
        /// 
        /// </summary>
        public string erp_mtrl_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mtrl_code { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        public string is_main { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string main_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string dosage { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string point_str { get; set; }
        public string sku_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string remark { get; set; }
    }
    public class Bs_wplan_mn_mtrl
    {
        /// <summary>
        /// 
        /// </summary>
        public int bom_side { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mtrl_code { get; set; }
        /// <summary>
        /// 物料版本
        /// </summary>
        public string bs_mtrl_sku_hd_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string sku_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal dosage { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal nn_qty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal tn_qty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal nn_qty_s { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal tn_qty_s { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string is_main { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string main_code { get; set; }

        public string allocateid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string point_str { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string third_rwn { get; set; }
        /// <summary>
        /// 测试
        /// </summary>
        public string remark { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_wplan_mn_mtrl_ex1 { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_wplan_mn_mtrl_ex2 { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_wplan_mn_mtrl_ex3 { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_wplan_mn_mtrl_ex4 { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_wplan_mn_mtrl_ex5 { get; set; }
    }

    public class BS_MO
    {
        /// <summary>
        /// 
        /// </summary>
        public string org_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string erp_mo_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string wplan_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string erp_mo { get; set; }
        /// <summary>
        /// 工单类型(0量产，1内部返工，2客退返工，3试产）
        /// </summary>
        public int mo_type { get; set; }
        /// <summary>
        /// 成品编码
        /// </summary>
        public string prod_code { get; set; }
        /// <summary>
        /// 客户编码
        /// </summary>
        public string cust_code { get; set; }
        /// <summary>
        /// 计划数量
        /// </summary>
        public decimal p_qty { get; set; }
        /// <summary>
        /// 计划开始时间  2022-11-15 00：00：00
        /// </summary>
        public string pb_date { get; set; }
        /// <summary>
        /// 计划开始时间 2022-11-15 00：00：00
        /// </summary>
        public string pe_date { get; set; }
        /// <summary>
        /// BOM版本号
        /// </summary>
        public string bom_ver { get; set; }
        /// <summary>
        /// 工艺段编码
        /// </summary>
        public string phase_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string wplan_id_par { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int wplan_stat { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string wplan_id_src { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string pt_code { get; set; }
        /// <summary>
        /// 是否委外
        /// </summary>
        public string is_outs { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string sup_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string delivery_date { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string is_bonded { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int first_bom_side { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_mtrl_sku_hd_id { get; set; }
        public string sku_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string lotno { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string assigned_lotno { get; set; }
        /// <summary>
        /// 测试
        /// </summary>
        public string remark { get; set; }
        /// <summary>
        /// 来源单据号
        /// </summary>
        public string so_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_wplan_ex1 { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_wplan_ex2 { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_wplan_ex3 { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_wplan_ex4 { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_wplan_ex5 { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_wplan_ex6 { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_wplan_ex7 { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_wplan_ex8 { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bs_wplan_ex9 { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<Bs_wplan_mn_mtrl> bs_wplan_mn_mtrl { get; set; }
    }


    public class BS_MODel
    {
        /// <summary>
        /// 
        /// </summary>
        public string QUEUE_ID { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string MO_ID { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        public string ERP_MO { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public string wplan_stat { get; set; }
        /// <summary>
        ///  
        /// </summary>
        public string org_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string remark { get; set; }

    }

    /// <summary>
    /// 发货单
    /// </summary>
    public class WMS_MN07
    {
        /// <summary>
        /// 
        /// </summary>
        public string pmn_code { get; set; }

        public string pmn_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        //public string ref_mn_code { get; set; }

        public string ship_date { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        public string cust_code { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public string cust_name { get; set; }
        /// <summary>
        /// 部门编码
        /// </summary>
         public string dept_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        //public string em_name { get; set; }

        //public string CONTACTS_USER { get; set; }

        public string ship_addr { get; set; }

        //public string CREATE_BY { get; set; }

        public string org_id { get; set; }

        public List<WMS_MN07S> bs_mn_mtrl { get; set; }
    }

    public class WMS_MN07S
    {
        public string seq { get; set; }
        public string store_code { get; set; }
        public string mtrl_code { get; set; }
        public string sku_code { get; set; }
        public string tn_qty { get; set; }
        public string sup_code { get; set; }
        public string SO_SEQ { get; set; }
        public string so_id { get; set; }
        public string third_rwn { get; set; }
        public string PMN_CHILD_ID { get; set; }
        public string remark { get; set; }


    }



    public class Wms_ro_mtrl_dt
    {
        /// <summary>
        /// 
        /// </summary>
        public int ro_mtrl_seq { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mtrl_code { get; set; }
        public string sku_code { get; set; }
        public string pmn_child_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string m_qty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string store_code { get; set; }
        //明细行
        public string remark { get; set; }
    }

    public class WMS_RO
    {
        /// <summary>
        /// 
        /// </summary>
        public string org_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int ro_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string ro_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string cust_code { get; set; }
        /// <summary>
        /// 测试
        /// </summary>
        public string remark { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<Wms_ro_mtrl_dt> wms_ro_mtrl_dt { get; set; }
    }

    ///// <summary>
    ///// 退货单
    ///// </summary>
    //public class WMS0007_1
    //{


    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string REF_MN_ID { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string ref_mn_code { get; set; }

    //    public string audit_date { get; set; }
    //    /// <summary>
    //    /// 订单号
    //    /// </summary>
    //    public string cust_code { get; set; }
    //    /// <summary>
    //    /// 状态
    //    /// </summary>
    //    public string cust_name { get; set; }
    //    /// <summary>
    //    ///  
    //    /// </summary>
    //    public string company_code { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string em_name { get; set; }

    //    public string CONTACTS_USER { get; set; }

    //    public string cust_addr { get; set; }

    //    public string CREATE_BY { get; set; }

    //    public string org_id { get; set; }

    //    public List<WMS0007_1s> bs_mn_mtrl { get; set; }
    //}

    //public class WMS0007_1s
    //{
    //    public string REF_SEQ { get; set; }
    //    public string store_code { get; set; }
    //    public string mtrl_code { get; set; }
    //    public string sku_code { get; set; }
    //    public string m_qty { get; set; }
    //    public string so_id { get; set; }

    //    public string SO_SEQ { get; set; }
    //    public string Ref_mn_child_id { get; set; }
    //    public string remark { get; set; }


    //}

    /////// <summary>
    /////// 采购退货单
    /////// </summary>
    //public class WMS_MNS
    //{
    //    /// <summary>
    //    /// 采购退货单子表标识
    //    /// </summary>
    //    public string pr_return_child_id { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string seq { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string po_code { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string po_seq { get; set; }
    //    /// <summary>
    //    /// 子表标识
    //    /// </summary>
    //    public string PR_CHILD_ID { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string store_code { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string sku_code { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string mtrl_code { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public double mn_plan_qty { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string remark { get; set; }
    //}

    //public class WMS_MN
    //{
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string org_id { get; set; }
    //    /// <summary>
    //    /// 测试
    //    /// </summary>
    //    public string pmn_code { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public int pmn_type { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public int ptm_oppt { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public int fl_rule { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string is_bonded { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string queue_id { get; set; }
    //    /// <summary>
    //    /// 采购退货单主表标识
    //    /// </summary>
    //    public string pr_return_id { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string sup_code { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string company_code { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string company_name { get; set; }
    //    /// <summary>
    //    /// 李二牛
    //    /// </summary>
    //    public string em_code { get; set; }
    //    /// <summary>
    //    /// 张三
    //    /// </summary>
    //    public string create_by { get; set; }
    //    /// <summary>
    //    /// 里斯
    //    /// </summary>
    //    public string AUDIT_BY { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public string remark { get; set; }
    //    /// <summary>
    //    /// 
    //    /// </summary>
    //    public List<WMS_MNS> bs_mn_mtrl { get; set; }
    //}


    public class WMS_MN
    {
        /// <summary>
        /// 
        /// </summary>
        public string pmn_code { get; set; }

        public string pmn_type { get; set; }

        /// <summary>
        /// 供应商编码 
        /// </summary>
        public string sup_code { get; set; }
        //提交人
        public string post_by { get; set; }
        //提交日期
        public string post_date { get; set; }
        //审核人
        public string audit_by { get; set; }
        //审核日期
        public string audit_date { get; set; }
         

        //public string CREATE_BY { get; set; }

        public string org_id { get; set; }

        public List<WMS_MNS> bs_mn_mtrl { get; set; }
        public List<WMS_MNStore> bs_mn_store { get; set; }

    }

    public class WMS_MNS
    {
        //行号
        public string third_rwn { get; set; }
        public string mtrl_code { get; set; }
        //public string sku_code { get; set; }
        public string tn_qty { get; set; }
        public string PMN_CHILD_ID { get; set; }
        public string remark { get; set; }


    }
    public class WMS_MNStore
    {

        public string store_code { get; set; }


    }

    /// <summary>
    /// 借出单
    /// </summary>
    public class WMS_LendTrans
    {

        public string QUEUE_ID { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string prod_lend_code { get; set; }

        public string ref_mn_date { get; set; }

        public string COMPANY_TYPE2 { get; set; }

        public string company { get; set; }
        /// <summary>
        ///  
        /// </summary>
        public string company_code { get; set; }

        public string dept_code { get; set; }
        public string contacts_user { get; set; }
        public string contacts_phone { get; set; }
        public string ship_company { get; set; }
        public string ship_company_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string em_name { get; set; }

        public string CREATE_BY { get; set; }

        public string org_id { get; set; }


        public List<WMS_LendTranss> prod_lend_ml { get; set; }
    }

    public class WMS_LendTranss
    {
        public string seq { get; set; }
        public string store_code { get; set; }
        public string mtrl_code { get; set; }
        public string measure_unit { get; set; }
        public string sku_code { get; set; }
        public int  third_rwn { get; set; }
        //实际需求数量
        public decimal tn_qty { get; set; }
        //已完成数量
        public decimal cmp_qty { get; set; }
        public string pmn_child_id { get; set; }

    }

    /// <summary>
    /// 归还单
    /// </summary>
    public class WMS_BackTrans
    {

        public string QUEUE_ID { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string prod_return_code { get; set; }

        public string ref_mn_date { get; set; }

        public string COMPANY_TYPE2 { get; set; }

        public string company { get; set; }
        /// <summary>
        ///  
        /// </summary>
        public string company_code { get; set; }

        public string dept_code { get; set; }
        public string contacts_user { get; set; }
        public string contacts_phone { get; set; }
        public string ship_company { get; set; }
        public string ship_company_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string em_name { get; set; }

        public string CREATE_BY { get; set; }

        public string org_id { get; set; }


        public List<WMS_BackTranss> prod_return_ml { get; set; }
    }

    public class WMS_BackTranss
    {
        public string seq { get; set; }
        public string store_code { get; set; }
        public string mtrl_code { get; set; }
        public string measure_unit { get; set; }
        public string sku_code { get; set; }
        public int third_rwn { get; set; }
        //实际需求数量
        public decimal tn_qty { get; set; }
        //已完成数量
        public decimal cmp_qty { get; set; }
        public string pmn_child_id { get; set; }

    }



}
